﻿using HotChocolate.Language;
using SimpleGraphQLDemo.WebApi.GraphTypes.Products.Types;

namespace SimpleGraphQLDemo.WebApi.GraphTypes.Products.Queries;

[ExtendObjectType(OperationType.Query)]
public class ProductQueryResolver
{
    public ProductGraphType GetProduct() => new ProductGraphType
    {
        Name = "This is product service.",
        ProductItem = new ProductItemGraphType()
        {
            Amount = 10,
            Amount2 = 20,
            Amount3 = 30,
            Amount4 = 40,
            ProductItemLog = new ProductItemLogGraphType()
            {
                CreateTime = DateTime.Now,
            }
        }
    };

    public string GetCurrentTime4() => DateTime.Now.ToString();
    public string GetCurrentTime5() => DateTime.Now.ToString();
    public string GetCurrentTime6() => DateTime.Now.ToString();
}
